; Music of Super Wonderboy In Monster Land (1989) (Activision) (David Whittaker)
; Ripped by Megachur the 11/02/2007

	write "SUPEWIML.BIN"

music_date_rip	equ &0b27
music_adr	equ &3091
first_theme	equ 0
last_theme	equ 1

	read "music_header_v1_0.asm"
	
;3091
;
.init_music
;
	push af
	call l32c2
	pop af
	ld c,a
	add a
	add c
	add a
	add c
	ld c,a
	ld b,#00
	ld hl,l3c07
	add hl,bc
	ld a,(hl)
	ld (l316d),a
	ld (l34a5),a
	inc hl
	ld ix,l30ec
	ld c,#22
	ld a,#03
.l30b2
	ld e,(hl)
	inc hl
	ld d,(hl)
	inc hl
	push hl
	ld (ix+#10),#01
	ld (ix+#00),b
	ld (ix+#1d),b
	ld (ix+#20),b
	ld (ix+#03),e
	ld (ix+#04),d
	ex de,hl
	ld e,(hl)
	inc hl
	ld d,(hl)
	ld (ix+#05),#02
	ld (ix+#06),b
	pop hl
	ld (ix+#01),e
	ld (ix+#02),d
	add ix,bc
	dec a
	jr nz,l30b2
	ld (l341a),a
	dec a
	ld (l34a6),a
	ld (l34a0),a
	ret
.l30ec
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#09
.l310e
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#12
.l3130
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#24
;
.play_music
;
	ld a,(l34a0)
	ld hl,l34a1
	or (hl)
	inc hl
	or (hl)
	inc hl
	or (hl)
	ret z
	call l3732
	ld a,(l34a0)
	and a
	jr z,l31b8
.l3168 equ $ + 1
	ld a,#00
	ld (l31b4),a
.l316d equ $ + 1
	ld a,#01
	ld hl,l34a6
	add (hl)
	ld (hl),a
	jr nc,l318c
	ld b,#00
	ld ix,l30ec
	call l336b
	ld ix,l310e
	call l336b
	ld ix,l3130
	call l336b
.l318c
	ld ix,l30ec
	call l33e7
	ld (l34a7),hl
	ld (l34af),a
	ld ix,l310e
	call l33e7
	ld (l34a9),hl
	ld (l34b0),a
	ld ix,l3130
	call l33e7
	ld (l34ab),hl
	ld (l34b1),a
.l31b4 equ $ + 1
	ld a,#00
	ld (l34ad),a
.l31b8
	ld a,(l34a0)
	and a
	jr nz,l31ce
	ld (l34af),a
	ld (l34b0),a
	ld (l34b1),a
	ld a,#3f
	ld (l34ae),a
	jr l31f6
.l31ce
	ld a,(l34a4)
	and #0f
	xor #0f
	jr z,l31f6
	ld b,a
	ld a,(l34af)
	sub b
	jr nc,l31df
	xor a
.l31df
	ld (l34af),a
	ld a,(l34b0)
	sub b
	jr nc,l31e9
	xor a
.l31e9
	ld (l34b0),a
	ld a,(l34b1)
	sub b
	jr nc,l31f3
	xor a
.l31f3
	ld (l34b1),a
.l31f6
	ld a,(l34a1)
	and a
	jr z,l321e
	ld hl,(l34b4)
	ld (l34a7),hl
	ld a,(l3baf)
	ld b,a
	bit 3,a
	jr nz,l3210
	ld a,(l34ba)
	ld (l34ad),a
.l3210
	ld hl,l34ae
	ld a,(hl)
	or #09
	and b
	ld (hl),a
	ld a,(l34bc)
	ld (l34af),a
.l321e
	ld a,(l34a2)
	and a
	jr z,l3248
	ld hl,(l34b6)
	ld (l34a9),hl
	ld a,(l3bc4)
	ld b,a
	bit 3,a
	jr nz,l3238
	ld a,(l34ba)
	ld (l34ad),a
.l3238
	ld hl,l34ae
	ld a,(hl)
	or #12
	rlc b
	and b
	ld (hl),a
	ld a,(l34bd)
	ld (l34b0),a
.l3248
	ld a,(l34a3)
	and a
	jr z,l3274
	ld hl,(l34b8)
	ld (l34ab),hl
	ld a,(l3bd9)
	ld b,a
	bit 3,a
	jr nz,l3262
	ld a,(l34ba)
	ld (l34ad),a
.l3262
	ld hl,l34ae
	ld a,(hl)
.l3266
	or #24
	rlc b
	rlc b
	and b
	ld (hl),a
	ld a,(l34be)
	ld (l34b1),a
.l3274
	ld hl,l34b1
	ld d,#0a
.l3279
	ld e,(hl)
	ld b,#f4
	out (c),d
	ld bc,#f600
	out (c),c
	ld a,#c0
	out (c),a
	out (c),c
	ld b,#f4
	out (c),e
	ld b,#f6
	add a
	out (c),a
	out (c),c
	dec hl
	dec d
	jp p,l3279
	ret
.l329a
	ld de,#0a00
.l329d
	call l32a7
	dec d
	jp p,l329d
	ld de,#073f
.l32a7
	ld b,#f4
	out (c),d
	ld bc,#f600
	out (c),c
	ld a,#c0
	out (c),a
	out (c),c
	ld b,#f4
	out (c),e
	ld b,#f6
	add a
	out (c),a
	out (c),c
	ret
;
.stop_music
.l32c2
;
	xor a
	ld (l34a0),a
	call l32d9
	xor a
	ld (l34af),a
	ld (l34b0),a
	ld (l34b1),a
	ld a,#0f
	ld (l34a4),a
	ret
.l32d9
	xor a
	ld (l34a1),a
	ld (l34a2),a
	ld (l34a3),a
	jp l329a
	db #7a,#74,#6d,#00,#00,#00,#00,#0c
	db #5a,#4b,#36,#00,#00,#00,#00,#74
	db #00,#00,#49
	ld c,(ix+#05)
	ld b,(ix+#06)
	ld l,(ix+#03)
	ld h,(ix+#04)
	add hl,bc
	inc bc
	inc bc
	ld a,(hl)
	inc hl
	ld d,(hl)
	ld e,a
	or d
	jr nz,l331b
	ld l,(ix+#03)
	ld h,(ix+#04)
	ld bc,#0002
	ld e,(hl)
	inc hl
	ld d,(hl)
.l331b
	ld (ix+#05),c
	ld (ix+#06),b
	ld b,#00
	jp l3378
	ld a,(ix+#21)
	ld c,a
	and #38
	ld hl,l3485
	xor (hl)
	and c
	xor (hl)
	ld (hl),a
	xor a
	ld (ix+#1e),a
	jp l3378
	ld a,(de)
	inc de
	ld (l341a),a
	jr l3378
	ld a,(de)
	inc de
	ld (ix+#20),a
	jr l3378
	ld a,(de)
	ld (ix+#1b),a
	inc de
	ld a,(de)
	ld (ix+#1a),a
	ld (ix+#1c),a
	inc de
	ld (ix+#1d),#40
	jr l3378
	ld (ix+#1d),b
	jr l3378
	ld (ix+#13),b
	res 5,(ix+#00)
	jr l33a7
	jr l33a3
.l336b
	dec (ix+#10)
	ret nz
	ld (ix+#00),b
	ld e,(ix+#01)
	ld d,(ix+#02)
.l3378
	ld a,(de)
	inc de
	and a
	jp m,l33b4
	ld (ix+#12),a
	bit 0,(ix+#1e)
	jr z,l338a
	ld (l3168),a
.l338a
	ld l,(ix+#14)
	ld (ix+#16),l
	ld h,(ix+#15)
	ld (ix+#17),h
	ld a,(hl)
	ld (ix+#18),a
	ld (ix+#13),a
	ld a,(ix+#0f)
	ld (ix+#19),a
.l33a3
	set 5,(ix+#00)
.l33a7
	ld a,(ix+#11)
	ld (ix+#10),a
	ld (ix+#02),d
	ld (ix+#01),e
	ret
.l33b4
	cp #c0
	jr c,l33df
	add #20
	jr c,l33c0
	add #10
	jr c,l33c7
.l33c0
	inc a
	ld (ix+#11),a
	jp l3378
.l33c7
	ld hl,l3550
	add a
	ld c,a
	add hl,bc
	ld a,(hl)
	inc hl
	ld h,(hl)
	ld l,a
	ld (ix+#14),l
	ld (ix+#15),h
	dec hl
	ld a,(hl)
	ld (ix+#0f),a
	jp l3378
.l33df
	ld hl,l3266
	ld c,a
	add hl,bc
	ld c,(hl)
	add hl,bc
	jp (hl)
.l33e7
	ld c,(ix+#00)
	bit 5,c
	jr z,l3419
	ld a,(ix+#19)
	sub #01
	ld (ix+#19),a
	jr nc,l3413
	ld a,(ix+#0f)
	ld (ix+#19),a
	ld l,(ix+#16)
	ld h,(ix+#17)
	inc hl
	ld a,(hl)
	and a
	jp m,l3413
	ld (ix+#16),l
	ld (ix+#17),h
	ld (ix+#18),a
.l3413
	ld a,(ix+#18)
	ld (ix+#13),a
.l341a equ $ + 1
.l3419
	ld a,#00
	add (ix+#12)
	add (ix+#20)
	ld hl,l34c0
	ld d,#00
	add a
	ld e,a
	add hl,de
	ld e,(hl)
	inc hl
	ld d,(hl)
	ld l,(ix+#1d)
	bit 6,l
	jr z,l347b
	ld h,a
	ld b,(ix+#1a)
	sla b
	bit 7,l
	ld a,(ix+#1c)
	jr z,l3444
	bit 0,c
	jr nz,l3462
.l3444
	bit 5,l
	jr nz,l3454
	sub (ix+#1b)
	jr nc,l345f
	set 5,(ix+#1d)
	sub a
	jr l345f
.l3454
	add (ix+#1b)
	cp b
	jr c,l345f
	res 5,(ix+#1d)
	ld a,b
.l345f
	ld (ix+#1c),a
.l3462
	ex de,hl
	srl b
	sub b
	ld e,a
	ld a,d
	ld d,#00
	jr nc,l346d
	dec d
.l346d
	add #a0
	jr c,l3479
.l3471
	sla e
	rl d
	add #18
	jr nc,l3471
.l3479
	add hl,de
	ex de,hl
.l347b
	ld a,c
	xor #01
	ld (ix+#00),a
	cpl
	and #03
.l3485 equ $ + 1
	ld a,#38
	jr nz,l3492
	ld a,(l3168)
	xor #08
	ld (l31b4),a
	ld a,#07
.l3492
	ld hl,l34ae
	xor (hl)
	and (ix+#21)
	xor (hl)
	ld (hl),a
	ex de,hl
	ld a,(ix+#13)
	ret
.l34a7 equ $ + 7
.l34a6 equ $ + 6
.l34a5 equ $ + 5
.l34a4 equ $ + 4
.l34a3 equ $ + 3
.l34a2 equ $ + 2
.l34a1 equ $ + 1
.l34a0
.music_end
	db #00,#00,#00,#00,#00,#00,#00,#00
.l34af equ $ + 7
.l34ae equ $ + 6
.l34ad equ $ + 5
.l34ab equ $ + 3
.l34a9 equ $ + 1
	db #00,#00,#00,#00,#00,#00,#3f,#0f
.l34b7 equ $ + 7
.l34b6 equ $ + 6
.l34b5 equ $ + 5
.l34b4 equ $ + 4
.l34b1 equ $ + 1
.l34b0
	db #0f,#0f,#00,#00,#00,#00,#00,#00
.l34be equ $ + 6
.l34bd equ $ + 5
.l34bc equ $ + 4
.l34ba equ $ + 2
.l34b9 equ $ + 1
.l34b8
	db #00,#00,#00,#3f,#00,#00,#00,#00
.l34c0
	dw #077c,#0708,#06b0,#0640
	dw #05ec,#0594,#0544,#04f8
	dw #04b0,#0470,#042c,#03f0
	dw #03be,#0384,#0358,#0320
	dw #02f6,#02ca,#02a2,#027c
	dw #0258,#0238,#0216,#01f8
	dw #01df,#01c2,#01ac,#0190
	dw #017b,#0165,#0151,#013e
	dw #012c,#011c,#010b,#00fc
	dw #00ef,#00e1,#00d6,#00c8
	dw #00bd,#00b2,#00a8,#009f
	dw #0096,#008e,#0085,#007e
	dw #0077,#0070,#006b,#0064
	dw #005e,#0059,#0054,#004f
	dw #004b,#0047,#0042,#003f
	dw #003b,#0038,#0035,#0032
	dw #002f,#002c,#002a,#0027
	dw #0025,#0023,#0021,#001f
.l3550
	dw l3571,l3577,l357e,l3590
	dw l35a2,l35a6,l35ab,l35b2
	dw l35bb,l35cc,l35d6,l35e0
	dw l35ea,l35fb,l360b,l3613
.l3577 equ $ + 7
.l3571 equ $ + 1
	db #01,#0c,#0d,#0e,#0d,#87,#01,#0d
.l357e equ $ + 6
	db #0e,#0f,#0e,#0d,#87,#01,#0f,#0e
	db #0d,#0b,#0d,#0c,#0a,#09,#0b,#0a
	db #08,#07,#09,#08,#06,#05,#87,#01
.l3590
	db #0f,#0f,#0d,#0b,#0d,#0c,#0a,#09
	db #0b,#0a,#08,#07,#09,#08,#06,#05
.l35a6 equ $ + 6
.l35a2 equ $ + 2
	db #87,#01,#0f,#0e,#87,#01,#0f,#0e
.l35ab equ $ + 3
	db #0d,#87,#01,#0e,#0f,#0e,#0d,#0c
.l35b2 equ $ + 2
	db #87,#02,#0e,#0d,#0c,#0b,#0a,#09
.l35bb equ $ + 3
	db #08,#87,#08,#0f,#0e,#0d,#0c,#0b
	db #0a,#09,#08,#07,#06,#05,#04,#03
.l35cc equ $ + 4
	db #02,#01,#87,#02,#0f,#0e,#0d,#0c
.l35d6 equ $ + 6
	db #0b,#0a,#09,#08,#87,#04,#0f,#0e
	db #0d,#0c,#0b,#0a,#09,#08,#87,#03
.l35e0
	db #0f,#0e,#0d,#0c,#0b,#0a,#09,#08
.l35ea equ $ + 2
	db #87,#01,#0f,#0e,#0d,#0c,#0b,#0a
	db #09,#08,#07,#06,#05,#04,#03,#02
.l35fb equ $ + 3
	db #01,#87,#01,#0e,#0d,#0c,#0b,#0a
	db #09,#08,#07,#06,#05,#04,#03,#02
.l360b equ $ + 3
	db #01,#87,#01,#0b,#02,#0d,#0e,#0d
.l3613 equ $ + 3
	db #0c,#87,#01,#0c,#87
	ld hl,l361e
	ld b,#00
	add hl,bc
	ld c,(hl)
	add hl,bc
	jp (hl)
.l361e
	inc bc
	ld e,l
	or a
	ld hl,l34a1
	ld (hl),#00
	ld hl,l395e
	add a
	add l
	ld l,a
	jr nc,l362f
	inc h
.l362f
	ld e,(hl)
	inc hl
	ld d,(hl)
	ld b,#0e
	ld hl,l3ba9
.l3637
	ld a,(de)
	ld (hl),a
	inc hl
	inc de
	djnz l3637
	ld a,(l3baa)
	ld (l3bb7),a
	ld hl,(l3bab)
	ld (l34b4),hl
	ld a,(l3baf)
	bit 3,a
	jr nz,l3654
	ld a,l
	ld (l34ba),a
.l3654
	ld a,(l3bb4)
	ld (l3bb8),a
	ld a,(l3bb6)
	ld (l3bbd),a
	ld a,(l3bb3)
	ld hl,l3afe
	add a
	ld c,a
	add hl,bc
	ld a,(hl)
	inc hl
	ld h,(hl)
	ld l,a
	ld (l3bb9),hl
	ld (l3bbb),hl
	ld a,(hl)
	ld (l34bc),a
	ld hl,l34a1
	inc (hl)
	ret
	ld hl,l34a2
	ld (hl),#00
	ld hl,l395e
	add a
	add l
	ld l,a
	jr nc,l368a
	inc h
.l368a
	ld e,(hl)
	inc hl
	ld d,(hl)
	ld b,#0e
	ld hl,l3bbe
.l3692
	ld a,(de)
	ld (hl),a
	inc hl
	inc de
	djnz l3692
	ld a,(l3bbf)
	ld (l3bcc),a
	ld hl,(l3bc0)
	ld (l34b6),hl
	ld a,(l3bc4)
	bit 3,a
	jr nz,l36af
	ld a,l
	ld (l34ba),a
.l36af
	ld a,(l3bc9)
	ld (l3bcd),a
	ld a,(l3bcb)
	ld (l3bd2),a
	ld a,(l3bc8)
	ld hl,l3afe
	add a
	ld c,a
	add hl,bc
	ld a,(hl)
	inc hl
	ld h,(hl)
	ld l,a
	ld (l3bce),hl
	ld (l3bd0),hl
	ld a,(hl)
	ld (l34bd),a
	ld hl,l34a2
	inc (hl)
	ret
	ld hl,l34a3
	ld (hl),#00
	ld hl,l395e
	add a
	add l
	ld l,a
	jr nc,l36e5
	inc h
.l36e5
	ld e,(hl)
	inc hl
	ld d,(hl)
	ld b,#0e
	ld hl,l3bd3
.l36ed
	ld a,(de)
	ld (hl),a
	inc hl
	inc de
	djnz l36ed
	ld a,(l3bd4)
	ld (l3be1),a
	ld hl,(l3bd5)
	ld (l34b8),hl
	ld a,(l3bd9)
	bit 3,a
	jr nz,l370a
	ld a,l
	ld (l34ba),a
.l370a
	ld a,(l3bde)
	ld (l3be2),a
	ld a,(l3be0)
	ld (l3be7),a
	ld a,(l3bdd)
	ld hl,l3afe
	add a
	ld c,a
	add hl,bc
	ld a,(hl)
	inc hl
	ld h,(hl)
	ld l,a
	ld (l3be3),hl
	ld (l3be5),hl
	ld a,(hl)
	ld (l34be),a
	ld hl,l34a3
	inc (hl)
	ret
.l3732
	call l3be8
	ld a,(l34a1)
	and a
	call nz,l37fa
	ld a,(l34a2)
	and a
	call nz,l38ac
	ld a,(l34a3)
	and a
	ret z
	ld a,(l3bd3)
	and a
	jr nz,l3758
	ld a,(l3bdf)
	and a
	jr nz,l3758
	ld (l34a3),a
	ret
.l3758
	dec a
	ld (l3bd3),a
	ld a,(l3be1)
	and a
	jr nz,l3790
	ld a,(l3bdf)
	and a
	jr nz,l376e
	ld a,(l3bdc)
	and a
	jr z,l37d2
.l376e
	dec a
	ld (l3bdc),a
	ld a,(l3bd4)
	ld (l3be1),a
	ld a,(l3bda)
	and a
	jr z,l3781
	ld a,(l3c05)
.l3781
	ld b,a
	ld a,(l3bd5)
	add b
	ld (l34b8),a
	ld a,(l3bd6)
	add b
	ld (l34b9),a
.l3790
	ld hl,l3be1
	dec (hl)
	ld hl,l3be0
	ld a,(hl)
	and a
	jr z,l37a2
	ld hl,l3be7
	dec (hl)
	jr nz,l37c5
	ld (hl),a
.l37a2
	ld a,(l3bdb)
	and a
	jr z,l37c5
	jp p,l37b8
	ld hl,(l34b8)
	ld de,(l3bd7)
	add hl,de
	ld (l34b8),hl
	jr l37c5
.l37b8
	ld hl,(l34b8)
	ld de,(l3bd7)
	and a
	sbc hl,de
	ld (l34b8),hl
.l37c5
	ld a,(l3bd9)
	bit 3,a
	jr nz,l37d2
	ld a,(l34b8)
	ld (l34ba),a
.l37d2
	ld a,(l3be2)
	dec a
	ld (l3be2),a
	jr nz,l37f9
	ld a,(l3bde)
	ld (l3be2),a
	ld hl,(l3be5)
	ld a,(hl)
	inc hl
	and a
	jp p,l37f3
	cp #80
	jr nz,l37f9
	ld hl,(l3be3)
	ld a,(hl)
	inc hl
.l37f3
	ld (l3be5),hl
	ld (l34be),a
.l37f9
	ret
.l37fa
	ld a,(l3ba9)
	and a
	jr nz,l380a
	ld a,(l3bb5)
	and a
	jr nz,l380a
	ld (l34a1),a
	ret
.l380a
	dec a
	ld (l3ba9),a
	ld a,(l3bb7)
	and a
	jr nz,l3842
	ld a,(l3bb5)
	and a
	jr nz,l3820
	ld a,(l3bb2)
	and a
	jr z,l3884
.l3820
	dec a
	ld (l3bb2),a
	ld a,(l3baa)
	ld (l3bb7),a
	ld a,(l3bb0)
	and a
	jr z,l3833
	ld a,(l3c03)
.l3833
	ld b,a
	ld a,(l3bab)
	add b
	ld (l34b4),a
	ld a,(l3bac)
	add b
	ld (l34b5),a
.l3842
	ld hl,l3bb7
	dec (hl)
	ld hl,l3bb6
	ld a,(hl)
	and a
	jr z,l3854
	ld hl,l3bbd
	dec (hl)
	jr nz,l3877
	ld (hl),a
.l3854
	ld a,(l3bb1)
	and a
	jr z,l3877
	jp p,l386a
	ld hl,(l34b4)
	ld de,(l3bad)
	add hl,de
	ld (l34b4),hl
	jr l3877
.l386a
	ld hl,(l34b4)
	ld de,(l3bad)
	and a
	sbc hl,de
	ld (l34b4),hl
.l3877
	ld a,(l3baf)
	bit 3,a
	jr nz,l3884
	ld a,(l34b4)
	ld (l34ba),a
.l3884
	ld a,(l3bb8)
	dec a
	ld (l3bb8),a
	jr nz,l38ab
	ld a,(l3bb4)
	ld (l3bb8),a
	ld hl,(l3bbb)
	ld a,(hl)
	inc hl
	and a
	jp p,l38a5
	cp #80
	jr nz,l38ab
	ld hl,(l3bb9)
	ld a,(hl)
	inc hl
.l38a5
	ld (l3bbb),hl
	ld (l34bc),a
.l38ab
	ret
.l38ac
	ld a,(l3bbe)
	and a
	jr nz,l38bc
	ld a,(l3bca)
	and a
	jr nz,l38bc
	ld (l34a2),a
	ret
.l38bc
	dec a
	ld (l3bbe),a
	ld a,(l3bcc)
	and a
	jr nz,l38f4
	ld a,(l3bca)
	and a
	jr nz,l38d2
	ld a,(l3bc7)
	and a
	jr z,l3936
.l38d2
	dec a
	ld (l3bc7),a
	ld a,(l3bbf)
	ld (l3bcc),a
	ld a,(l3bc5)
	and a
	jr z,l38e5
	ld a,(l3c04)
.l38e5
	ld b,a
	ld a,(l3bc0)
	add b
	ld (l34b6),a
	ld a,(l3bc1)
	add b
	ld (l34b7),a
.l38f4
	ld hl,l3bcc
	dec (hl)
	ld hl,l3bcb
	ld a,(hl)
	and a
	jr z,l3906
	ld hl,l3bd2
	dec (hl)
	jr nz,l3929
	ld (hl),a
.l3906
	ld a,(l3bc6)
	and a
	jr z,l3929
	jp p,l391c
	ld hl,(l34b6)
	ld de,(l3bc2)
	add hl,de
	ld (l34b6),hl
	jr l3929
.l391c
	ld hl,(l34b6)
	ld de,(l3bc2)
	and a
	sbc hl,de
	ld (l34b6),hl
.l3929
	ld a,(l3bc4)
	bit 3,a
	jr nz,l3936
	ld a,(l34b6)
	ld (l34ba),a
.l3936
	ld a,(l3bcd)
	dec a
	ld (l3bcd),a
	jr nz,l395d
	ld a,(l3bc9)
	ld (l3bcd),a
	ld hl,(l3bd0)
	ld a,(hl)
	inc hl
	and a
	jp p,l3957
	cp #80
	jr nz,l395d
	ld hl,(l3bce)
	ld a,(hl)
	inc hl
.l3957
	ld (l3bd0),hl
	ld (l34bd),a
.l395d
	ret
.l395e
	dw l3992,l39a0,l39ae,l39bc
	dw l39ca,l39d8,l39e6,l39f4
	dw l3a02,l3a10,l3a1e,l3a2c
	dw l3a3a,l3a48,l3a56,l3a64
	dw l3a72,l3a80,l3a8e,l3a9c
	dw l3aaa,l3ab8,l3ac6,l3ad4
	dw l3ae2,l3af0
.l3992
	db #0f,#0e,#81,#01,#14,#00,#fe,#00
.l39a0 equ $ + 6
	db #01,#00,#00,#03,#00,#00,#1e,#63
	db #41,#00,#04,#00,#fe,#00,#ff,#63
.l39ae equ $ + 4
	db #08,#06,#00,#03,#0f,#63,#c8,#00
	db #10,#00,#f6,#00,#ff,#63,#05,#01
.l39bc equ $ + 2
	db #00,#00,#32,#0a,#50,#00,#0c,#00
	db #fe,#00,#ff,#63,#08,#05,#00,#02
.l39ca
	db #28,#01,#af,#00,#00,#00,#fe,#00
.l39d8 equ $ + 6
	db #ff,#63,#09,#01,#00,#00,#19,#18
	db #01,#02,#14,#00,#fe,#00,#01,#00
.l39e6 equ $ + 4
	db #00,#06,#00,#00,#19,#05,#81,#00
	db #10,#00,#fe,#00,#01,#63,#00,#03
.l39f4 equ $ + 2
	db #00,#00,#14,#63,#90,#00,#08,#00
	db #fe,#00,#01,#63,#00,#05,#00,#02
.l3a02
	db #0c,#02,#1e,#00,#01,#00,#fe,#00
.l3a10 equ $ + 6
	db #01,#63,#08,#02,#00,#00,#0c,#63
	db #26,#00,#00,#00,#fe,#00,#01,#63
.l3a1e equ $ + 4
	db #05,#02,#00,#00,#32,#63,#1f,#00
	db #11,#00,#f7,#00,#01,#63,#01,#02
.l3a2c equ $ + 2
	db #00,#02,#32,#04,#00,#04,#16,#00
	db #f6,#01,#ff,#63,#09,#01,#00,#00
.l3a3a
	db #c8,#ff,#10,#00,#01,#04,#fe,#00
.l3a48 equ $ + 6
	db #ff,#63,#01,#08,#00,#00,#0c,#05
	db #c8,#00,#20,#00,#f6,#00,#ff,#63
.l3a56 equ $ + 4
	db #00,#01,#00,#00,#0c,#02,#0f,#00
	db #11,#00,#f7,#ff,#01,#ff,#00,#01
.l3a64 equ $ + 2
	db #00,#00,#1e,#02,#40,#02,#0c,#00
	db #fe,#00,#ff,#63,#04,#01,#00,#00
.l3a72
	db #1e,#02,#c0,#00,#04,#00,#fe,#00
.l3a80 equ $ + 6
	db #ff,#63,#04,#01,#00,#00,#19,#28
	db #1f,#00,#01,#00,#f6,#00,#01,#00
.l3a8e equ $ + 4
	db #06,#02,#00,#03,#50,#03,#f8,#03
	db #44,#00,#fe,#00,#ff,#63,#07,#02
.l3a9c equ $ + 2
	db #00,#00,#46,#03,#08,#05,#30,#00
	db #f6,#00,#ff,#ff,#04,#02,#00,#00
.l3aaa
	db #50,#04,#00,#04,#16,#00,#f6,#01
.l3ab8 equ $ + 6
	db #ff,#63,#00,#04,#00,#00,#0f,#03
	db #0f,#05,#30,#00,#f6,#00,#ff,#ff
.l3ac6 equ $ + 4
	db #00,#01,#00,#00,#0f,#63,#f0,#00
	db #21,#00,#fe,#00,#ff,#63,#04,#01
.l3ad4 equ $ + 2
	db #00,#00,#0b,#05,#0f,#00,#04,#00
	db #f6,#00,#01,#0a,#00,#01,#00,#00
.l3ae2
	db #32,#0a,#0a,#00,#03,#00,#f6,#01
.l3af0 equ $ + 6
	db #ff,#0a,#00,#04,#00,#00,#3c,#06
	db #81,#00,#24,#00,#f6,#00,#ff,#63
	db #00,#04,#00,#00
.l3afe
	dw l3b12,l3b22,l3b3b,l3b53
	dw l3b64,l3b6c,l3b75,l3b82
	dw l3b84,l3b93
.l3b12
	db #0f,#0e,#0d,#0c,#0b,#0a,#09,#08
	db #07,#06,#05,#04,#03,#02,#01,#ff
.l3b22
	db #06,#08,#0a,#0b,#0c,#0d,#0e,#0e
	db #0e,#0d,#0d,#0c,#0c,#0b,#0b,#09
	db #08,#07,#06,#05,#04,#03,#02,#01
.l3b3b equ $ + 1
	db #ff,#06,#08,#0a,#0c,#0e,#0f,#0e
	db #0e,#0d,#0d,#0c,#0c,#0b,#0b,#09
	db #08,#07,#06,#05,#04,#03,#02,#01
.l3b53 equ $ + 1
	db #ff,#06,#08,#0a,#0b,#0c,#0b,#0a
	db #09,#08,#07,#06,#05,#04,#03,#02
.l3b64 equ $ + 2
	db #01,#ff,#06,#07,#08,#0a,#0b,#0c
.l3b6c equ $ + 2
	db #0d,#ff,#0f,#00,#00,#0e,#00,#00
.l3b75 equ $ + 3
	db #0d,#00,#ff,#0c,#0b,#0a,#09,#08
	db #07,#06,#05,#04,#03,#02,#01,#ff
.l3b84 equ $ + 2
.l3b82
	db #0c,#80,#0e,#0d,#0c,#0b,#0a,#09
	db #08,#07,#06,#05,#04,#03,#02,#01
.l3b93 equ $ + 1
	db #ff,#0f,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l3ba9 equ $ + 7
	db #00,#00,#00,#00,#0f,#00,#ff,#00
.l3bb1 equ $ + 7
.l3bb0 equ $ + 6
.l3baf equ $ + 5
.l3bad equ $ + 3
.l3bac equ $ + 2
.l3bab equ $ + 1
.l3baa
	db #00,#00,#00,#00,#00,#00,#00,#00
.l3bb9 equ $ + 7
.l3bb8 equ $ + 6
.l3bb7 equ $ + 5
.l3bb6 equ $ + 4
.l3bb5 equ $ + 3
.l3bb4 equ $ + 2
.l3bb3 equ $ + 1
.l3bb2
	db #00,#00,#00,#00,#00,#00,#00,#00
.l3bc1 equ $ + 7
.l3bc0 equ $ + 6
.l3bbf equ $ + 5
.l3bbe equ $ + 4
.l3bbd equ $ + 3
.l3bbb equ $ + 1
	db #00,#00,#00,#00,#00,#00,#00,#00
.l3bc9 equ $ + 7
.l3bc8 equ $ + 6
.l3bc7 equ $ + 5
.l3bc6 equ $ + 4
.l3bc5 equ $ + 3
.l3bc4 equ $ + 2
.l3bc2
	db #00,#00,#00,#00,#00,#00,#00,#00
.l3bd0 equ $ + 6
.l3bce equ $ + 4
.l3bcd equ $ + 3
.l3bcc equ $ + 2
.l3bcb equ $ + 1
.l3bca
	db #00,#00,#00,#00,#00,#00,#00,#00
.l3bd9 equ $ + 7
.l3bd7 equ $ + 5
.l3bd6 equ $ + 4
.l3bd5 equ $ + 3
.l3bd4 equ $ + 2
.l3bd3 equ $ + 1
.l3bd2
	db #00,#00,#00,#00,#00,#00,#00,#00
.l3be1 equ $ + 7
.l3be0 equ $ + 6
.l3bdf equ $ + 5
.l3bde equ $ + 4
.l3bdd equ $ + 3
.l3bdc equ $ + 2
.l3bdb equ $ + 1
.l3bda
	db #00,#00,#00,#00,#00,#00,#00,#00
.l3be7 equ $ + 5
.l3be5 equ $ + 3
.l3be3 equ $ + 1
.l3be2
	db #00,#00,#00,#00,#00,#00
.l3be8
	ld a,(l3c03)
	and #48
	adc #38
	sla a
	sla a
	ld hl,l3c06
	rl (hl)
	dec hl
	rl (hl)
	dec hl
	rl (hl)
	dec hl
	rl (hl)
	ld a,(hl)
	ret
.l3c06 equ $ + 3
.l3c05 equ $ + 2
.l3c04 equ $ + 1
.l3c03
	db #ff,#80,#1b,#34
.l3c07
	db #30
	dw l3c19,l3c15,l3c1d
	db #27
	dw l3d6e,l3d64,l3d78
.l3c15
	dw l3c31,#0000
.l3c19
	dw l3c9b,#0000
.l3c1d
	dw l3d01,l3d40,l3d40,l3d53
	dw l3d53,l3d40,l3d40,l3d53
	dw l3d53,#0000
.l3c31
	db #89,#fc,#8a,#88,#01,#01,#db,#e1
	db #13,#13,#18,#18,#13,#13,#8f,#11
	db #13,#13,#18,#18,#13,#13,#8f,#11
	db #13,#13,#18,#18,#13,#13,#8f,#11
	db #13,#13,#18,#18,#13,#13,#8f,#11
	db #11,#11,#15,#18,#11,#11,#8f,#10
	db #11,#11,#15,#18,#11,#11,#8f,#10
	db #13,#13,#18,#1a,#13,#13,#8f,#11
	db #13,#13,#18,#1a,#13,#13,#8f,#11
	db #d4,#e5,#18,#f5,#16,#e1,#14,#11
	db #e5,#13,#f9,#10,#e5,#18,#f5,#16
	db #e1,#16,#14,#e5,#16,#e9,#10,#db
	db #e1,#18,#18,#18,#18,#18,#80,#1a
.l3c9b equ $ + 2
	db #80,#87,#8a,#88,#01,#01,#da,#e3
	db #80,#e5,#32,#e3,#32,#e1,#32,#e5
	db #32,#e9,#81,#32,#82,#e3,#80,#e5
	db #32,#e3,#32,#e1,#32,#eb,#81,#32
	db #82,#e3,#32,#e3,#80,#e5,#30,#e3
	db #30,#e1,#30,#e5,#30,#e9,#30,#e3
	db #80,#e5,#32,#e3,#32,#e1,#32,#e5
	db #32,#e9,#32,#da,#e3,#80,#e5,#32
	db #37,#d4,#3c,#e9,#3a,#eb,#80,#da
	db #e1,#35,#32,#d4,#e5,#39,#e9,#37
	db #88,#01,#01,#e5,#3c,#e9,#3a,#eb
	db #80,#da,#e3,#3a,#e5,#3a,#3c,#e1
	db #3e,#3e,#eb,#80,#e1,#43,#43,#87
.l3d01
	db #8a,#da,#88,#01,#01,#e1,#37,#37
	db #39,#3a,#39,#37,#35,#32,#e3,#37
	db #e1,#37,#e9,#32,#e1,#37,#37,#39
	db #3a,#39,#37,#8f,#e0,#35,#37,#e7
	db #3e,#e3,#43,#e1,#43,#80,#e1,#3a
	db #e3,#39,#f5,#35,#e1,#35,#32,#e5
	db #39,#e0,#3a,#39,#e3,#37,#e1,#35
.l3d40 equ $ + 7
	db #37,#eb,#8f,#e1,#41,#43,#87,#d7
	db #e0,#37,#3a,#3d,#3e,#37,#3a,#3c
	db #3e,#37,#3a,#3d,#3e,#37,#3a,#3c
.l3d53 equ $ + 2
	db #3e,#87,#36,#3a,#3d,#3e,#36,#3a
	db #3c,#3e,#36,#3a,#3d,#3e,#36,#3a
	db #3c,#3e,#87
.l3d64
	dw l3d8e,l3dd5,l3e1a,l3dd5
	dw #0000
.l3d6e
	dw l3e5d,l3ea1,l3ee6,l3ea1
	dw #0000
.l3d78
	dw l3f29,l3f75,l3fba,l3f75
	dw l3ffc,l3f29,l3f75,l3fba
	dw l3f75,l3ff9,#0000
.l3d8e
	db #8a,#da,#88,#01,#01,#e0,#15,#80
	db #18,#80,#10,#80,#18,#15,#80,#15
	db #18,#80,#10,#80,#18,#0f,#0e,#80
	db #1d,#80,#15,#80,#1d,#0e,#80,#0e
	db #1d,#80,#15,#80,#11,#80,#18,#80
	db #1c,#80,#13,#80,#1c,#18,#80,#18
	db #1c,#80,#13,#80,#1c,#80,#10,#80
	db #1c,#80,#10,#80,#1d,#80,#10,#80
.l3dd5 equ $ + 7
	db #20,#80,#1c,#1c,#20,#80,#87,#e0
	db #15,#80,#18,#80,#10,#80,#18,#15
	db #80,#15,#18,#80,#10,#80,#18,#0f
	db #0e,#80,#1d,#80,#15,#80,#1d,#0e
	db #80,#0e,#1d,#80,#15,#80,#1d,#80
	db #e1,#15,#e0,#1c,#80,#e1,#17,#e0
	db #1d,#80,#e1,#18,#e0,#1f,#80,#e1
	db #1a,#e0,#21,#80,#e1,#18,#e0,#1f
	db #80,#e1,#17,#e0,#1f,#80,#e1,#15
.l3e1a equ $ + 4
	db #1f,#e3,#1c,#87,#e0,#0e,#80,#1d
	db #80,#15,#80,#1d,#80,#13,#80,#23
	db #80,#1a,#80,#23,#80,#e1,#18,#e0
	db #1c,#80,#e1,#17,#e0,#1c,#80,#e1
	db #15,#e0,#18,#80,#e1,#10,#e0,#18
	db #80,#e1,#0e,#e0,#1d,#80,#e1,#15
	db #e0,#1d,#80,#18,#80,#1c,#80,#18
	db #80,#1c,#80,#1d,#80,#1f,#80,#21
.l3e5d equ $ + 7
	db #80,#23,#80,#e3,#1f,#26,#87,#8a
	db #da,#e0,#15,#80,#1c,#80,#10,#80
	db #1c,#15,#80,#15,#1c,#80,#10,#80
	db #1c,#0f,#0e,#80,#21,#80,#15,#80
	db #21,#0e,#80,#0e,#21,#80,#15,#80
	db #15,#80,#18,#80,#1f,#80,#13,#80
	db #1f,#18,#80,#18,#1f,#80,#13,#80
	db #1f,#80,#10,#80,#20,#80,#10,#80
	db #21,#80,#10,#80,#23,#80,#1c,#1c
.l3ea1 equ $ + 3
	db #23,#80,#87,#e0,#15,#80,#1c,#80
	db #10,#80,#1c,#15,#80,#15,#1c,#80
	db #10,#80,#1c,#0f,#0e,#80,#21,#80
	db #15,#80,#21,#0e,#80,#0e,#21,#80
	db #15,#80,#21,#80,#e1,#15,#e0,#24
	db #80,#e1,#17,#e0,#26,#80,#e1,#18
	db #e0,#28,#80,#e1,#1a,#e0,#29,#80
	db #e1,#18,#e0,#28,#80,#e1,#17,#e0
	db #26,#80,#e1,#15,#23,#e3,#25,#87
.l3ee6
	db #e0,#0e,#80,#21,#80,#15,#80,#21
	db #80,#13,#80,#26,#80,#1a,#80,#26
	db #80,#e1,#18,#e0,#1f,#80,#e1,#17
	db #e0,#1f,#80,#e1,#15,#e0,#1c,#80
	db #e1,#10,#e0,#1c,#80,#e1,#0e,#e0
	db #21,#80,#e1,#15,#e0,#21,#80,#18
	db #80,#1f,#80,#18,#80,#1f,#80,#21
	db #80,#23,#80,#24,#80,#26,#80,#e3
.l3f29 equ $ + 3
	db #26,#2b,#87,#8a,#88,#01,#01,#da
	db #e0,#21,#20,#e1,#21,#e0,#28,#27
	db #e1,#28,#e0,#2d,#2c,#e1,#2d,#e0
	db #34,#80,#33,#80,#32,#e1,#80,#e0
	db #2d,#e1,#80,#e3,#32,#e1,#34,#e0
	db #32,#30,#2d,#2b,#e0,#1d,#1c,#e1
	db #1d,#e0,#24,#23,#e1,#24,#e0,#29
	db #28,#2d,#2c,#30,#2f,#35,#34,#32
	db #80,#32,#80,#32,#80,#e3,#34,#e0
.l3f75 equ $ + 7
	db #2d,#28,#2d,#28,#34,#34,#87,#e0
	db #21,#20,#e1,#21,#e0,#28,#27,#e1
	db #28,#e0,#2d,#2c,#e1,#2d,#e0,#34
	db #80,#33,#80,#32,#e1,#80,#e0,#2d
	db #e1,#80,#e3,#32,#e1,#34,#e0,#32
	db #30,#2d,#2b,#e0,#29,#29,#2d,#80
	db #2b,#80,#2f,#80,#2d,#80,#30,#80
	db #2f,#80,#32,#80,#34,#80,#30,#80
	db #32,#80,#2f,#80,#2d,#2c,#2d,#2c
.l3fba equ $ + 4
	db #2d,#e2,#80,#87,#e1,#29,#e0,#28
	db #80,#e1,#29,#e0,#28,#80,#e1,#29
	db #e0,#28,#e2,#26,#e0,#26,#80,#24
	db #80,#26,#80,#28,#80,#26,#80,#24
	db #24,#2b,#80,#29,#80,#28,#80,#26
	db #80,#24,#e2,#26,#e1,#80,#e0,#28
	db #80,#26,#e2,#28,#e1,#80,#e0,#26
	db #80,#28,#80,#29,#80,#2b,#80,#e3
.l3ffc equ $ + 6
.l3ff9 equ $ + 3
	db #2d,#2f,#87,#92,#00,#87,#92,#0c
	db #87
;

.game_name
	db "Super Wonderboy In Monster Land",0
.game_year
	db "1989",0
.game_publisher
	db "Activision",0
.music_author
	db "David Whittaker",0
.music_comment
	db "",0

	read "music_end_v1_0.asm"
